<?php

namespace app\admin\validate;

use think\Validate;

class Device extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'mobile_serial' => 'require|unique:device',
    ];
    /**
     * 提示消息
     */
    protected $message = [
        'mobile_serial.require' => '设备序列号不能为空',
        'mobile_serial.unique'  => '设备序列号已存在'
    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'add'  => [],
        'edit' => [],
    ];
    
}
